package org.darkforest.dao.mapper;

import org.darkforest.dao.annotation.DBMapper;
import org.darkforest.model.Address;
import org.darkforest.model.AddressVo;

import java.util.List;
import java.util.Map;

@DBMapper
public interface AddressMapper {
    int deleteByPrimaryKey(Integer addressId);
    
    int deleteByMember(Map<String, Object> p);

    int insert(Address record);

    int insertSelective(Address record);

    AddressVo selectByPrimaryKey(Integer addressId);

    int updateByPrimaryKeySelective(Address record);

    int updateByPrimaryKey(Address record);
    
    List<Address> selectByMember(Integer memberId);

    List<Address> selectAddress();

    Address getDefaultAddrByMember(Integer memberId);
    
    int updateCleanDefaultByMember(Integer memberId);
    
    int getAddressCount(Integer memberId);

    Address getUserDefaultAddressByUserId(Integer userId);

    List<Address> selectAddressByCondition(Address record);
}